using UnityEngine;
using QFramework;
using QAssetBundle;

namespace ProjectSurvivor
{
	public partial class TreasuerChest : GamePlayObject
	{
        protected override Collider2D Collider2D => SelfCircleCollider2D;
        private void OnTriggerEnter2D(Collider2D collision)
        {
            if (collision.GetComponent<CollectableArea>())
            {
                UIGamePanel.OpenTreasurePanel.Trigger();
                this.DestroyGameObjGracefully();
                AudioKit.PlaySound(Sfx.TREASUER_CHEST);
            }
        }
    }
}
